<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePackagesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('packages', function (Blueprint $table) {
            $table->increments('id');
            $table->string('pkg_name',64)->default('')->comment('包名')->index('pkg');
            $table->string('download_url',255)->default('')->comment('包下载地址');
            $table->string('md5',32)->default('')->comment('包下载地址');
            $table->integer('version_code')->default(0)->comment('版本号');
            $table->string('version_name')->default('')->comment('版本名称');
            $table->text('update_desc_en')->comment('英文更新说明');
            $table->text('update_desc_zh')->comment('中文更新说明');
            $table->timestamps();
            $table->softDeletes();
            $table->engine = 'InnoDB';
            $table->charset = 'utf8';
            $table->collation='utf8_general_ci';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('packages');
    }
}
